#pragma once

#include <d3dx9mesh.h>
#include "MeshResource.h"

class DXMeshResource: public MeshResource
{
protected:
	ID3DXMesh* m_Mesh;
	IDirect3DIndexBuffer9* m_IndexBuffer;
	IDirect3DVertexBuffer9* m_VertexBuffer;

public:
	DXMeshResource(void);
	virtual ~DXMeshResource(void);

	virtual bool Load(wstring filePath);

	virtual void Unload();
	virtual bool Reload();	
	virtual bool IsEmpty() { return m_Mesh == NULL; }

	void RenderSubset(unsigned int subsetId);

};

